<?
$linhaCom = new linhaComando($com);
$comando = $linhaCom->getComando();
	
switch ($comando) {
	case 'norte': $action[0] = 'move'; $action[1] = $comando; break;
	case 'sul': $action[0] = 'move'; $action[1] = $comando; break;
	case 'este': $action[0] = 'move'; $action[1] = $comando; break;
	case 'oeste': $action[0] = 'move'; $action[1] = $comando; break;
	case 'noroeste': $action[0] = 'move'; $action[1] = $comando; break;
	case 'nordeste': $action[0] = 'move'; $action[1] = $comando; break;
	case 'sudoeste': $action[0] = 'move'; $action[1] = $comando; break;
	case 'sudeste': $action[0] = 'move'; $action[1] = $comando; break;
	
	case 'atributos': $action[0] = 'atributos'; break;
	case 'examinar': $action[0] = 'examinar';
		if ($linhaCom->getNumArgs() > 2) {
			$action[1] = $linhaCom->getArgPos(',', 0); $action[2] = $linhaCom->getArgPos(',', 1);
		} else $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'comprar': $action[0] = 'comprar';
		if ($linhaCom->getNumArgs() > 2) {
			$action[1] = $linhaCom->getArgPos(',', 0); $action[2] = $linhaCom->getArgPos(',', 1);
		} else $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'vender': $action[0] = 'vender';
		if ($linhaCom->getNumArgs() > 2) {
			$action[1] = $linhaCom->getArgPos(',', 0); $action[2] = $linhaCom->getArgPos(',', 1);
		} else $action[1] = $linhaCom->getArgPos('', 0); break;
	
	case 'apanhar': $action[0] = 'apanharObj'; $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'largar': $action[0] = 'largarObj'; $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'equipar': $action[0] = 'equiparObj'; $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'desequipar': $action[0] = 'desequiparObj'; $action[1] = $linhaCom->getArgPos('', 0); break;
	
	case 'combater': $action[0] = 'combater'; $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'atacar': $action[0] = 'atacar'; break;
	
	case 'beber': $action[0] = 'ingerir'; $action[1] = $linhaCom->getArgPos('', 0); break;
	case 'invocar': $action[0] = 'invocar'; $action[1] = $linhaCom->getArgPos('', 0); break;
	
	default: ;
}

$html->set['com_result'] == '<br>';

if ($combateId = $pers->getCombateId()) {
	include('interpretador_combate.php');
} else {
	switch($action[0]) {
		case 'move': $pers->mover($mapa, $areaActual, $action[1], $manager, $html); break;
		case 'atributos': $pers->listarAtributos($html); break;
		case 'examinar': $pers->examinar($areaActual, $action[1], $action[2], $manager, $html); break;
		case 'comprar': $pers->comprarObj($areaActual, $action[1], $action[2], $manager, $html); break;
		case 'vender': $pers->venderObj($areaActual, $action[1], $action[2], $manager, $html); break;
		
		case 'apanharObj': $pers->apanharObj($conta, $areaActual, $action[1], $manager, $html); break;
		case 'largarObj': $pers->largarObj($conta, $areaActual, $action[1], $manager, $html); break;
		case 'desequiparObj': $pers->desequiparObj($conta, $action[1], $manager, $html); break;
		case 'equiparObj': $pers->equiparObj($conta, $action[1], $manager, $html); break;
		
		case 'combater': $pers->prepararCombate($areaActual, $action[1], $manager, $html); break;
		
		case 'ingerir': $pers->ingerirObj($action[1], $manager, $html); break;
		default: ;
	}
}
?>